package com.cheng.api_getway_zuul.feign;

import com.alibaba.fastjson.JSONObject;
import com.nimbusds.jose.JOSEException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author wangke
 */
@FeignClient(value = "service-jwt")
@Component
public interface JWTService {

    /**
     * 校验token
     *
     * @param token
     * @return
     */
    @GetMapping(value = "/token/verify")
    JSONObject verify(@RequestParam("token") String token) throws JOSEException;
}